package com.taotao.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.pojo.TaotaoResult;
import com.taotao.service.ItemParamService;

@Controller
@RequestMapping("/item/param")
public class ItemParamController {

	@Autowired
	private ItemParamService itemParamService;
	
	@RequestMapping(value="/cid/{cid}")
	@ResponseBody
	public TaotaoResult getItemParamByCid(@PathVariable Long cid)
	{
		TaotaoResult result = itemParamService.getItemParamByCid(cid);	
		return result;
	}
	
	@RequestMapping(value="save/{cid}")
	@ResponseBody
	public TaotaoResult addItemParam(@PathVariable Long cid,String paramData)
	{
		TaotaoResult result = itemParamService.addItemParam(cid, paramData);	
		return result;
	}
}
